using System;
using CQRS.Events.Memento;

namespace CQRS.Events
{
    public interface IDomainRepository<TEvent> where TEvent : Event
    {
        TAggregate GetById<TAggregate>(Guid id)
            where TAggregate : class, IOriginator, IEventProvider<TEvent>, new();

        void Add<TAggregate>(TAggregate aggregateRoot)
            where TAggregate : class, IOriginator, IEventProvider<TEvent>, new();

        void Commit();
    }
}